package com.example.fragment;

import java.util.ArrayList;
import java.util.List;
import com.example.hellondk.IDCardReadActivity;
import com.example.hellondk.R;
import com.example.hellondk.SatelliteMenu;
import com.example.hellondk.SatelliteMenuItem;
import com.example.hellondk.SatelliteMenu.SateliteClickedListener;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

public class FragmentPage3 extends Fragment {

	private View view;

	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		view = inflater.inflate(R.layout.fragment_3, null);
		SatelliteMenu menu = (SatelliteMenu) view.findViewById(R.id.sate_menu);

		List<SatelliteMenuItem> items = new ArrayList<SatelliteMenuItem>();
		items.add(new SatelliteMenuItem(6, R.drawable.ic_1));
		items.add(new SatelliteMenuItem(5, R.drawable.ic_3));
		items.add(new SatelliteMenuItem(4, R.drawable.ic_4));
		items.add(new SatelliteMenuItem(3, R.drawable.ic_5));
		items.add(new SatelliteMenuItem(2, R.drawable.ic_6));
		items.add(new SatelliteMenuItem(1, R.drawable.ic_2));
		menu.addItems(items);

		menu.setOnItemClickedListener(new SateliteClickedListener() {

			public void eventOccured(int id) {
				switch (id) {
				case 1: {
					Log.i(IDCardReadActivity.TAG, "Clicked on " + id);
					break;
				}
				case 2: {
					
					break;
				}
				case 3: {
					break;
				}
				case 4: {
					break;
				}
				case 5: {
					break;
				}
				case 6: {
					break;
				}
				default:
					break;
				}
				
			}
		});
		return view;
	}
}